cd /opt/docker

if [ ! -d "digit-back/" ];then
  echo "create dir digit-back"
  mkdir digit-back
fi

echo "cp app.jar to digit-back"
cp app.jar digit-back/

echo "stop docker compose..."
docker compose -f docker-compose.yml  down >/dev/null 2>&1

echo "load new docker image..."

docker load -i blade-da.0.42.0.tar.gz

docker compose -f docker-compose.yml up -d --force-recreate --build digit-back

